<script src="/javascripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script src="/javascripts/mce_editor.js" type="text/javascript"></script>


<div class='form'>
  <% form_for @article,:html=>{:multipart=>true} do |f| %>
    <%= f.error_messages %>

    <p>
      <label for="article─article_type">文章类型</label>
      <%=select("article", "article_type",Article::TYPE,:prompt => "请选择..")%>
    </p>

    <p>
      <label for="article_title">标题</label>
      <%= f.text_field :title %>
    </p>

    <p>
      <label for="article_image_url">上传图片</label>
      <%= file_column_field "article", "image_url" %>
    </p>

    <p>
      <label for="article_content">内容</label>
      <%= f.text_area :content,:class =>"mce-editor" %>
    </p>

    <p>
      <label for="article_top">属性</label>
      置顶
      <%= f.check_box :top %> |
      可用
      <%= f.check_box :active %>
    </p>
    <p>
      <%= f.submit button_name,:class=>'submit' %>
    </p>
  <% end %>
</div>